Integrand size = 31, antiderivative size = 232 \[ \int \frac {(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {(21 A-8 B) \text {arctanh}(\sin (c+d x))}{2 a^4 d}-\frac {8 (216 A-83 B) \tan (c+d x)}{105 a^4 d}+\frac {(21 A-8 B) \sec (c+d x) \tan (c+d x)}{2 a^4 d}-\frac {(129 A-52 B) \sec (c+d x) \tan (c+d x)}{105 a^4 d (1+\cos (c+d x))^2}-\frac {4 (216 A-83 B) \sec (c+d x) \tan (c+d x)}{105 a^4 d (1+\cos (c+d x))}-\frac {(A-B) \sec (c+d x) \tan (c+d x)}{7 d (a+a \cos (c+d x))^4}-\frac {(2 A-B) \sec (c+d x) \tan (c+d x)}{5 a d (a+a \cos (c+d x))^3} \]
1/2*(21*A-8*B)*arctanh(sin(d*x+c))/a^4/d-8/105*(216*A-83*B)*tan(d*x+c)/a^4 /d+1/2*(21*A-8*B)*sec(d*x+c)*tan(d*x+c)/a^4/d-1/105*(129*A-52*B)*sec(d*x+c )*tan(d*x+c)/a^4/d/(1+cos(d*x+c))^2-4/105*(216*A-83*B)*sec(d*x+c)*tan(d*x+ c)/a^4/d/(1+cos(d*x+c))-1/7*(A-B)*sec(d*x+c)*tan(d*x+c)/d/(a+a*cos(d*x+c)) ^4-1/5*(2*A-B)*sec(d*x+c)*tan(d*x+c)/a/d/(a+a*cos(d*x+c))^3
Leaf count is larger than twice the leaf count of optimal. \(798\) vs. \(2(232)=464\).
Time = 8.17 (sec) , antiderivative size = 798, normalized size of antiderivative = 3.44 \[ \int \frac {(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+a \cos (c+d x))^4} \, dx=-\frac {8 (21 A-8 B) \cos ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d (a+a \cos (c+d x))^4}+\frac {8 (21 A-8 B) \cos ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d (a+a \cos (c+d x))^4}+\frac {\cos \left (\frac {c}{2}+\frac {d x}{2}\right ) \sec \left (\frac {c}{2}\right ) \sec (c) \sec ^2(c+d x) \left (73206 A \sin \left (\frac {d x}{2}\right )-38668 B \sin \left (\frac {d x}{2}\right )-166668 A \sin \left (\frac {3 d x}{2}\right )+64384 B \sin \left (\frac {3 d x}{2}\right )+183162 A \sin \left (c-\frac {d x}{2}\right )-70896 B \sin \left (c-\frac {d x}{2}\right )-100842 A \sin \left (c+\frac {d x}{2}\right )+50316 B \sin \left (c+\frac {d x}{2}\right )+155526 A \sin \left (2 c+\frac {d x}{2}\right )-59248 B \sin \left (2 c+\frac {d x}{2}\right )+37380 A \sin \left (c+\frac {3 d x}{2}\right )-22820 B \sin \left (c+\frac {3 d x}{2}\right )-101148 A \sin \left (2 c+\frac {3 d x}{2}\right )+48004 B \sin \left (2 c+\frac {3 d x}{2}\right )+102900 A \sin \left (3 c+\frac {3 d x}{2}\right )-39200 B \sin \left (3 c+\frac {3 d x}{2}\right )-119364 A \sin \left (c+\frac {5 d x}{2}\right )+46032 B \sin \left (c+\frac {5 d x}{2}\right )+8820 A \sin \left (2 c+\frac {5 d x}{2}\right )-8750 B \sin \left (2 c+\frac {5 d x}{2}\right )-78204 A \sin \left (3 c+\frac {5 d x}{2}\right )+35742 B \sin \left (3 c+\frac {5 d x}{2}\right )+49980 A \sin \left (4 c+\frac {5 d x}{2}\right )-19040 B \sin \left (4 c+\frac {5 d x}{2}\right )-64053 A \sin \left (2 c+\frac {7 d x}{2}\right )+24664 B \sin \left (2 c+\frac {7 d x}{2}\right )-3885 A \sin \left (3 c+\frac {7 d x}{2}\right )-1050 B \sin \left (3 c+\frac {7 d x}{2}\right )-44733 A \sin \left (4 c+\frac {7 d x}{2}\right )+19834 B \sin \left (4 c+\frac {7 d x}{2}\right )+15435 A \sin \left (5 c+\frac {7 d x}{2}\right )-5880 B \sin \left (5 c+\frac {7 d x}{2}\right )-21987 A \sin \left (3 c+\frac {9 d x}{2}\right )+8456 B \sin \left (3 c+\frac {9 d x}{2}\right )-3675 A \sin \left (4 c+\frac {9 d x}{2}\right )+630 B \sin \left (4 c+\frac {9 d x}{2}\right )-16107 A \sin \left (5 c+\frac {9 d x}{2}\right )+6986 B \sin \left (5 c+\frac {9 d x}{2}\right )+2205 A \sin \left (6 c+\frac {9 d x}{2}\right )-840 B \sin \left (6 c+\frac {9 d x}{2}\right )-3456 A \sin \left (4 c+\frac {11 d x}{2}\right )+1328 B \sin \left (4 c+\frac {11 d x}{2}\right )-840 A \sin \left (5 c+\frac {11 d x}{2}\right )+210 B \sin \left (5 c+\frac {11 d x}{2}\right )-2616 A \sin \left (6 c+\frac {11 d x}{2}\right )+1118 B \sin \left (6 c+\frac {11 d x}{2}\right )\right )}{6720 d (a+a \cos (c+d x))^4} \]
(-8*(21*A - 8*B)*Cos[c/2 + (d*x)/2]^8*Log[Cos[c/2 + (d*x)/2] - Sin[c/2 + ( d*x)/2]])/(d*(a + a*Cos[c + d*x])^4) + (8*(21*A - 8*B)*Cos[c/2 + (d*x)/2]^ 8*Log[Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2]])/(d*(a + a*Cos[c + d*x])^4) + (Cos[c/2 + (d*x)/2]*Sec[c/2]*Sec[c]*Sec[c + d*x]^2*(73206*A*Sin[(d*x)/2 ] - 38668*B*Sin[(d*x)/2] - 166668*A*Sin[(3*d*x)/2] + 64384*B*Sin[(3*d*x)/2 ] + 183162*A*Sin[c - (d*x)/2] - 70896*B*Sin[c - (d*x)/2] - 100842*A*Sin[c + (d*x)/2] + 50316*B*Sin[c + (d*x)/2] + 155526*A*Sin[2*c + (d*x)/2] - 5924 8*B*Sin[2*c + (d*x)/2] + 37380*A*Sin[c + (3*d*x)/2] - 22820*B*Sin[c + (3*d *x)/2] - 101148*A*Sin[2*c + (3*d*x)/2] + 48004*B*Sin[2*c + (3*d*x)/2] + 10 2900*A*Sin[3*c + (3*d*x)/2] - 39200*B*Sin[3*c + (3*d*x)/2] - 119364*A*Sin[ c + (5*d*x)/2] + 46032*B*Sin[c + (5*d*x)/2] + 8820*A*Sin[2*c + (5*d*x)/2] - 8750*B*Sin[2*c + (5*d*x)/2] - 78204*A*Sin[3*c + (5*d*x)/2] + 35742*B*Sin [3*c + (5*d*x)/2] + 49980*A*Sin[4*c + (5*d*x)/2] - 19040*B*Sin[4*c + (5*d* x)/2] - 64053*A*Sin[2*c + (7*d*x)/2] + 24664*B*Sin[2*c + (7*d*x)/2] - 3885 *A*Sin[3*c + (7*d*x)/2] - 1050*B*Sin[3*c + (7*d*x)/2] - 44733*A*Sin[4*c + (7*d*x)/2] + 19834*B*Sin[4*c + (7*d*x)/2] + 15435*A*Sin[5*c + (7*d*x)/2] - 5880*B*Sin[5*c + (7*d*x)/2] - 21987*A*Sin[3*c + (9*d*x)/2] + 8456*B*Sin[3 *c + (9*d*x)/2] - 3675*A*Sin[4*c + (9*d*x)/2] + 630*B*Sin[4*c + (9*d*x)/2] - 16107*A*Sin[5*c + (9*d*x)/2] + 6986*B*Sin[5*c + (9*d*x)/2] + 2205*A*Sin [6*c + (9*d*x)/2] - 840*B*Sin[6*c + (9*d*x)/2] - 3456*A*Sin[4*c + (11*d...
Time = 1.74 (sec) , antiderivative size = 247, normalized size of antiderivative = 1.06, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.516, Rules used = {3042, 3457, 3042, 3457, 3042, 3457, 3042, 3457, 3042, 3227, 3042, 4254, 24, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^3(c+d x) (A+B \cos (c+d x))}{(a \cos (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}dx\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\int \frac {(a (9 A-2 B)-5 a (A-B) \cos (c+d x)) \sec ^3(c+d x)}{(\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (9 A-2 B)-5 a (A-B) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}dx}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\int \frac {\left (a^2 (73 A-24 B)-28 a^2 (2 A-B) \cos (c+d x)\right ) \sec ^3(c+d x)}{(\cos (c+d x) a+a)^2}dx}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {a^2 (73 A-24 B)-28 a^2 (2 A-B) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\left (a^3 (477 A-176 B)-3 a^3 (129 A-52 B) \cos (c+d x)\right ) \sec ^3(c+d x)}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {a^3 (477 A-176 B)-3 a^3 (129 A-52 B) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\frac {\frac {\int \left (105 a^4 (21 A-8 B)-8 a^4 (216 A-83 B) \cos (c+d x)\right ) \sec ^3(c+d x)dx}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {\int \frac {105 a^4 (21 A-8 B)-8 a^4 (216 A-83 B) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3}dx}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {\frac {\frac {\frac {105 a^4 (21 A-8 B) \int \sec ^3(c+d x)dx-8 a^4 (216 A-83 B) \int \sec ^2(c+d x)dx}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {105 a^4 (21 A-8 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-8 a^4 (216 A-83 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {\frac {\frac {\frac {8 a^4 (216 A-83 B) \int 1d(-\tan (c+d x))}{d}+105 a^4 (21 A-8 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {\frac {\frac {105 a^4 (21 A-8 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {8 a^4 (216 A-83 B) \tan (c+d x)}{d}}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {\frac {\frac {\frac {105 a^4 (21 A-8 B) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {8 a^4 (216 A-83 B) \tan (c+d x)}{d}}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {105 a^4 (21 A-8 B) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {8 a^4 (216 A-83 B) \tan (c+d x)}{d}}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {\frac {\frac {105 a^4 (21 A-8 B) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {8 a^4 (216 A-83 B) \tan (c+d x)}{d}}{a^2}-\frac {4 a^3 (216 A-83 B) \tan (c+d x) \sec (c+d x)}{d (a \cos (c+d x)+a)}}{3 a^2}-\frac {(129 A-52 B) \tan (c+d x) \sec (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {7 a (2 A-B) \tan (c+d x) \sec (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \tan (c+d x) \sec (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
-1/7*((A - B)*Sec[c + d*x]*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])^4) + ((-7 *a*(2*A - B)*Sec[c + d*x]*Tan[c + d*x])/(5*d*(a + a*Cos[c + d*x])^3) + (-1 /3*((129*A - 52*B)*Sec[c + d*x]*Tan[c + d*x])/(d*(1 + Cos[c + d*x])^2) + ( (-4*a^3*(216*A - 83*B)*Sec[c + d*x]*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])) + ((-8*a^4*(216*A - 83*B)*Tan[c + d*x])/d + 105*a^4*(21*A - 8*B)*(ArcTanh [Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)))/a^2)/(3*a^2))/( 5*a^2))/(7*a^2)
3.1.73.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 1.54 (sec) , antiderivative size = 192, normalized size of antiderivative = 0.83
method | result | size |
parallelrisch | \(\frac {-70560 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (A -\frac {8 B}{21}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+70560 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (A -\frac {8 B}{21}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-11619 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {23540 A}{3873}-\frac {3040 B}{1291}\right ) \cos \left (2 d x +2 c \right )+\left (\frac {3992 A}{1291}-\frac {13864 B}{11619}\right ) \cos \left (3 d x +3 c \right )+\left (A -\frac {4472 B}{11619}\right ) \cos \left (4 d x +4 c \right )+\left (\frac {192 A}{1291}-\frac {664 B}{11619}\right ) \cos \left (5 d x +5 c \right )+\left (\frac {34168 A}{3873}-\frac {39952 B}{11619}\right ) \cos \left (d x +c \right )+\frac {19387 A}{3873}-\frac {22888 B}{11619}\right ) \left (\sec ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6720 d \,a^{4} \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(192\) |
derivativedivides | \(\frac {-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}+\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{7}-\frac {9 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{5}-13 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A +\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}-111 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+49 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-84 A +32 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {-36 A +8 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {4 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {-36 A +8 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (84 A -32 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {4 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}{8 d \,a^{4}}\) | \(234\) |
default | \(\frac {-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}+\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{7}-\frac {9 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{5}-13 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A +\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}-111 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+49 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-84 A +32 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {-36 A +8 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {4 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {-36 A +8 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (84 A -32 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {4 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}{8 d \,a^{4}}\) | \(234\) |
norman | \(\frac {-\frac {\left (A -B \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{56 a d}-\frac {\left (29 A -22 B \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{140 a d}-\frac {\left (167 A -65 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {\left (171 A -62 B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 a d}-\frac {\left (1161 A -643 B \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{840 a d}-\frac {\left (2529 A -1052 B \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{210 a d}+\frac {\left (2913 A -1069 B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{120 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2} a^{3}}-\frac {\left (21 A -8 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{4} d}+\frac {\left (21 A -8 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{4} d}\) | \(269\) |
risch | \(-\frac {i \left (2205 A \,{\mathrm e}^{10 i \left (d x +c \right )}-840 B \,{\mathrm e}^{10 i \left (d x +c \right )}+15435 A \,{\mathrm e}^{9 i \left (d x +c \right )}-5880 B \,{\mathrm e}^{9 i \left (d x +c \right )}+49980 A \,{\mathrm e}^{8 i \left (d x +c \right )}-19040 B \,{\mathrm e}^{8 i \left (d x +c \right )}+102900 A \,{\mathrm e}^{7 i \left (d x +c \right )}-39200 B \,{\mathrm e}^{7 i \left (d x +c \right )}+155526 A \,{\mathrm e}^{6 i \left (d x +c \right )}-59248 B \,{\mathrm e}^{6 i \left (d x +c \right )}+183162 A \,{\mathrm e}^{5 i \left (d x +c \right )}-70896 B \,{\mathrm e}^{5 i \left (d x +c \right )}+166668 A \,{\mathrm e}^{4 i \left (d x +c \right )}-64384 B \,{\mathrm e}^{4 i \left (d x +c \right )}+119364 A \,{\mathrm e}^{3 i \left (d x +c \right )}-46032 B \,{\mathrm e}^{3 i \left (d x +c \right )}+64053 A \,{\mathrm e}^{2 i \left (d x +c \right )}-24664 B \,{\mathrm e}^{2 i \left (d x +c \right )}+21987 A \,{\mathrm e}^{i \left (d x +c \right )}-8456 B \,{\mathrm e}^{i \left (d x +c \right )}+3456 A -1328 B \right )}{105 d \,a^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {21 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 a^{4} d}-\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{a^{4} d}-\frac {21 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 a^{4} d}+\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{a^{4} d}\) | \(372\) |
1/6720*(-70560*(1+cos(2*d*x+2*c))*(A-8/21*B)*ln(tan(1/2*d*x+1/2*c)-1)+7056 0*(1+cos(2*d*x+2*c))*(A-8/21*B)*ln(tan(1/2*d*x+1/2*c)+1)-11619*tan(1/2*d*x +1/2*c)*((23540/3873*A-3040/1291*B)*cos(2*d*x+2*c)+(3992/1291*A-13864/1161 9*B)*cos(3*d*x+3*c)+(A-4472/11619*B)*cos(4*d*x+4*c)+(192/1291*A-664/11619* B)*cos(5*d*x+5*c)+(34168/3873*A-39952/11619*B)*cos(d*x+c)+19387/3873*A-228 88/11619*B)*sec(1/2*d*x+1/2*c)^6)/d/a^4/(1+cos(2*d*x+2*c))
Time = 0.32 (sec) , antiderivative size = 360, normalized size of antiderivative = 1.55 \[ \int \frac {(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {105 \, {\left ({\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{5} + 6 \, {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{4} + 4 \, {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 105 \, {\left ({\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{5} + 6 \, {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{4} + 4 \, {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (21 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (16 \, {\left (216 \, A - 83 \, B\right )} \cos \left (d x + c\right )^{5} + {\left (11619 \, A - 4472 \, B\right )} \cos \left (d x + c\right )^{4} + 4 \, {\left (3411 \, A - 1318 \, B\right )} \cos \left (d x + c\right )^{3} + 4 \, {\left (1509 \, A - 592 \, B\right )} \cos \left (d x + c\right )^{2} + 210 \, {\left (2 \, A - B\right )} \cos \left (d x + c\right ) - 105 \, A\right )} \sin \left (d x + c\right )}{420 \, {\left (a^{4} d \cos \left (d x + c\right )^{6} + 4 \, a^{4} d \cos \left (d x + c\right )^{5} + 6 \, a^{4} d \cos \left (d x + c\right )^{4} + 4 \, a^{4} d \cos \left (d x + c\right )^{3} + a^{4} d \cos \left (d x + c\right )^{2}\right )}} \]
1/420*(105*((21*A - 8*B)*cos(d*x + c)^6 + 4*(21*A - 8*B)*cos(d*x + c)^5 + 6*(21*A - 8*B)*cos(d*x + c)^4 + 4*(21*A - 8*B)*cos(d*x + c)^3 + (21*A - 8* B)*cos(d*x + c)^2)*log(sin(d*x + c) + 1) - 105*((21*A - 8*B)*cos(d*x + c)^ 6 + 4*(21*A - 8*B)*cos(d*x + c)^5 + 6*(21*A - 8*B)*cos(d*x + c)^4 + 4*(21* A - 8*B)*cos(d*x + c)^3 + (21*A - 8*B)*cos(d*x + c)^2)*log(-sin(d*x + c) + 1) - 2*(16*(216*A - 83*B)*cos(d*x + c)^5 + (11619*A - 4472*B)*cos(d*x + c )^4 + 4*(3411*A - 1318*B)*cos(d*x + c)^3 + 4*(1509*A - 592*B)*cos(d*x + c) ^2 + 210*(2*A - B)*cos(d*x + c) - 105*A)*sin(d*x + c))/(a^4*d*cos(d*x + c) ^6 + 4*a^4*d*cos(d*x + c)^5 + 6*a^4*d*cos(d*x + c)^4 + 4*a^4*d*cos(d*x + c )^3 + a^4*d*cos(d*x + c)^2)
\[ \int \frac {(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {\int \frac {A \sec ^{3}{\left (c + d x \right )}}{\cos ^{4}{\left (c + d x \right )} + 4 \cos ^{3}{\left (c + d x \right )} + 6 \cos ^{2}{\left (c + d x \right )} + 4 \cos {\left (c + d x \right )} + 1}\, dx + \int \frac {B \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}}{\cos ^{4}{\left (c + d x \right )} + 4 \cos ^{3}{\left (c + d x \right )} + 6 \cos ^{2}{\left (c + d x \right )} + 4 \cos {\left (c + d x \right )} + 1}\, dx}{a^{4}} \]
(Integral(A*sec(c + d*x)**3/(cos(c + d*x)**4 + 4*cos(c + d*x)**3 + 6*cos(c + d*x)**2 + 4*cos(c + d*x) + 1), x) + Integral(B*cos(c + d*x)*sec(c + d*x )**3/(cos(c + d*x)**4 + 4*cos(c + d*x)**3 + 6*cos(c + d*x)**2 + 4*cos(c + d*x) + 1), x))/a**4
Time = 0.21 (sec) , antiderivative size = 419, normalized size of antiderivative = 1.81 \[ \int \frac {(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+a \cos (c+d x))^4} \, dx=-\frac {3 \, A {\left (\frac {280 \, {\left (\frac {7 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {9 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{4} - \frac {2 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {3885 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {455 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {63 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {2940 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac {2940 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}\right )} - B {\left (\frac {1680 \, \sin \left (d x + c\right )}{{\left (a^{4} - \frac {a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {5145 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {805 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {147 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {3360 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac {3360 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}\right )}}{840 \, d} \]
-1/840*(3*A*(280*(7*sin(d*x + c)/(cos(d*x + c) + 1) - 9*sin(d*x + c)^3/(co s(d*x + c) + 1)^3)/(a^4 - 2*a^4*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a^4* sin(d*x + c)^4/(cos(d*x + c) + 1)^4) + (3885*sin(d*x + c)/(cos(d*x + c) + 1) + 455*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 63*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 5*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 - 2940*log(sin(d* x + c)/(cos(d*x + c) + 1) + 1)/a^4 + 2940*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^4) - B*(1680*sin(d*x + c)/((a^4 - a^4*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)) + (5145*sin(d*x + c)/(cos(d*x + c) + 1) + 805*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 147*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 - 3360*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^4 + 3360*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^4))/d
Time = 0.38 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.15 \[ \int \frac {(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {\frac {420 \, {\left (21 \, A - 8 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{4}} - \frac {420 \, {\left (21 \, A - 8 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{4}} + \frac {840 \, {\left (9 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{4}} - \frac {15 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 189 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 147 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1365 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 805 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 11655 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5145 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{28}}}{840 \, d} \]
1/840*(420*(21*A - 8*B)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^4 - 420*(21*A - 8*B)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^4 + 840*(9*A*tan(1/2*d*x + 1/ 2*c)^3 - 2*B*tan(1/2*d*x + 1/2*c)^3 - 7*A*tan(1/2*d*x + 1/2*c) + 2*B*tan(1 /2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^2*a^4) - (15*A*a^24*tan(1/2 *d*x + 1/2*c)^7 - 15*B*a^24*tan(1/2*d*x + 1/2*c)^7 + 189*A*a^24*tan(1/2*d* x + 1/2*c)^5 - 147*B*a^24*tan(1/2*d*x + 1/2*c)^5 + 1365*A*a^24*tan(1/2*d*x + 1/2*c)^3 - 805*B*a^24*tan(1/2*d*x + 1/2*c)^3 + 11655*A*a^24*tan(1/2*d*x + 1/2*c) - 5145*B*a^24*tan(1/2*d*x + 1/2*c))/a^28)/d
Time = 0.36 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.18 \[ \int \frac {(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+a \cos (c+d x))^4} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (9\,A-2\,B\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (7\,A-2\,B\right )}{d\,\left (a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^4\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {5\,A}{2\,a^4}+\frac {5\,\left (A-B\right )}{4\,a^4}+\frac {3\,\left (6\,A-4\,B\right )}{4\,a^4}+\frac {3\,\left (15\,A-5\,B\right )}{8\,a^4}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {A-B}{4\,a^4}+\frac {6\,A-4\,B}{8\,a^4}+\frac {15\,A-5\,B}{24\,a^4}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {3\,\left (A-B\right )}{40\,a^4}+\frac {6\,A-4\,B}{40\,a^4}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (A-B\right )}{56\,a^4\,d}+\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (21\,A-8\,B\right )}{a^4\,d} \]
(tan(c/2 + (d*x)/2)^3*(9*A - 2*B) - tan(c/2 + (d*x)/2)*(7*A - 2*B))/(d*(a^ 4*tan(c/2 + (d*x)/2)^4 - 2*a^4*tan(c/2 + (d*x)/2)^2 + a^4)) - (tan(c/2 + ( d*x)/2)*((5*A)/(2*a^4) + (5*(A - B))/(4*a^4) + (3*(6*A - 4*B))/(4*a^4) + ( 3*(15*A - 5*B))/(8*a^4)))/d - (tan(c/2 + (d*x)/2)^3*((A - B)/(4*a^4) + (6* A - 4*B)/(8*a^4) + (15*A - 5*B)/(24*a^4)))/d - (tan(c/2 + (d*x)/2)^5*((3*( A - B))/(40*a^4) + (6*A - 4*B)/(40*a^4)))/d - (tan(c/2 + (d*x)/2)^7*(A - B ))/(56*a^4*d) + (atanh(tan(c/2 + (d*x)/2))*(21*A - 8*B))/(a^4*d)